import requests


def index():
    url = 'https://app.dewu.com/api/v1/app/commodity/ice/boutique-recommend/detail'
    data = {"acquirerRecommend": 0,
            "aggregation": {"aggregation": False, "brandId": "", "categoryId": "", "cpv": "", "fitId": "",
                            "hasPrice": "", "highestPrice": "", "lowestPrice": "", "property": "", "sellDate": "",
                            "seriesId": "", "sortMode": 1, "sortType": 1}, "lastId": "", "lastSpuId": 0,
            "loginToken": "", "newSign": "be843333c1d0b3e412656e646eb71059", "platform": "android", "realPageNum": 0,
            "recommendId": 1026868, "spuIds": [], "timestamp": "1624778816507", "type": 0, "uuid": "2d91cec5570a9553",
            "v": "4.71.0"}
    rep = requests.post(url, json=data).json()
    print(rep)


def index2():
    headers = {
        'Host': 'app.dewu.com',
        'appId': 'duapp',
        'User-Agent': 'duapp/4.71.0(android;6.0.1)',
        'shumeiid': '20210625223346ef2a05f37a86a231ba60d3e34849b5a301f0b7effda5d04f',
        'Content-Type': 'application/json; charset=utf-8',
        'Cookie': 'duToken=30fca855|1552921812|1624793449|f3417db91e7d10e7',
        'timestamp': "1624864437464",
        "duv": "4.71.0",
        "duuuid": "2d91cec5570a9553",
        'duplatform': 'android',
        'X-Auth-Token': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiIyZDkxY2VjNTU3MGE5NTUzIiwic3ViIjoiMmQ5MWNlYzU1NzBhOTU1MyIsImlhdCI6MTYyNDg2MzE2MCwiZXhwIjoxNjU2Mzk5MTYwLCJ1dWlkIjoiMmQ5MWNlYzU1NzBhOTU1MyIsInVzZXJJZCI6MTY3NTUwNDE3MywidXNlck5hbWUiOiJcdTU5NGJcdTY1OTdcdTllMzNcdTllMmYzTDMiLCJpc0d1ZXN0Ijp0cnVlfQ.dFR3LVvp7g-35RjoLg_c60hECc9f0shsHX7EZ7zxJpZ4tuXKzSsyaWXaTLJ2L-d6ISXIJ8I5nmbc_eBncebFxG_w0zCNXFbqhzu8m4Rx11E5cEkwOLBJdQ6jaMItmlar9_4twHHNs4-DTA0vnz9FotJ89Itnez2_4Z1YkZ-SQEwz4cQWfTcZfTqlP8-0joOpjmZpCqn8O6kE4Ssd3Jbg4IpMetwjOKRZxODxPQcjT_LVSu0OgnUUlAS4lyL_I6h4308nz0zhIajrl0-xq3yqjkV1P9Td4aS1_C0mfewXYvoSOmd72qhN8PEt2YRicy7LdJSG9eDMRxqg4nxe2f6X3A'
    }
    dt = {
        "catId": 1000119,
        "loginToken": "",
        "newSign": "403f4e6218a876ba9b984ce24891fdd9",
        "platform": "android",
        "timestamp": "1624864437464",
        "uuid": "2d91cec5570a9553",
        "v": "4.71.0"
    }
    url = 'https://app.dewu.com/api/v1/app/commodity/ice/search/doCategoryDetail'
    rep = requests.post(url, json=dt, headers=headers).json()
    print(rep)


if __name__ == '__main__':
    index2()
